<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="点我到百度assign" onclick="location.assign('http://www.baidu.com')">
<input type="button" value="点我到百度href" onclick="location.href ='http://www.baidu.com'">

<input type="button" value="点我到百度replace" onclick="location.replace('http://www.baidu.com')">
<input type="button" value="刷新reload" onclick="location.reload()">
<script>
    window.onload = function () {
        console.log("aa")
    }
</script>
</body>
</html>